import React from 'react';
import ChargeDetail from './ChargeDetail';
import ChargePay from './ChargePay';
import {chargePay} from './Common';
export default class Charge500 extends React.Component {
    constructor(props) {
        super(props);
        this.state={
            account:12223456786,
            money:500,
            referralCode:null,
        }
    }
    getreferralCode=(val)=>{
        this.setState({
            referralCode:val,
        })
        console.log(this.state.referralCode);
    }

     pay=()=>{
         chargePay(this.state.account,this.state.money,'text/text.json');

    }
    render(){
        return(
           <div>
               <ChargeDetail account={this.state.account} getreferralCode={this.getreferralCode}/>
             {/*  <ChargePay money={this.state.money} pay={this.pay}/>*/}
           </div>
        )
    }
}
